package com.birdy.room.service;

import com.birdy.exception.ServiceException;
import com.birdy.vo.Room;
import com.birdy.vo.UserInfo;

import javax.websocket.Session;
import java.util.List;
import java.util.Map;

/**
 * @author birdy
 * @date 2022/4/11 9:00 AM
 */
public interface IRoomService {

    /**
     * 获取所有玩家信息
     */
    List<UserInfo> getUserList(Map<String, Session> sessionMap);

    /**
     * 新增房间
     *
     * @return 房间ID
     */
    int addRoom(Room room) throws ServiceException;

    /**
     * 删除房间
     *
     * @param roomId 房间ID
     */
    void deleteRoom(int roomId);

    /**
     * 获取房间列表
     *
     * @return 房间列表
     */
    Object getRoomList();

    Room getRoomInfo(int roomId);
}
